import request from '@/utils/HttpRequest'

export default {

    //用户注册
    memberRegister(userVo) {
        return request({
            url: '/gmmallmember/member/register',
            method: 'post',
            data: userVo
        })
    },

    //用户登录
    memberLogin(userVo) {
        return request({
            url: '/gmmallauth/login',
            method: 'post',
            data: userVo
        })
    },

    //用户退出
    memberLogout(token) {
        return request({
            url: '/gmmallauth/logout',
            method: 'get',
            params: {token}
        })
    },

    //获取用户的购物车数量
    memberShoppingCartNum(memberId) {
        return request({
            url: '/gmmallmember/gameshoppingcart/getNum/' + memberId,
            method: 'get'
        })
    },

    //获取用户信息
    getMemberInfoById(id) {
        return request({
            url: '/gmmallmember/member/info/' + id,
            method: 'get',
        })
    }

}